const color = [
  "#00AEFF",
  "#F9AF1A",
  "#FF6723",
  "#27F3EC"
]


export default function getColorByIndex(index) {
  if (index < color.length) {
    return color[index]
  } else {
    return getRandomColor();
  }
}




function getRandomColor() {
  let r = Math.floor(Math.random() * 256);
  let g = Math.floor(Math.random() * 256);
  let b = Math.floor(Math.random() * 256);
  return "#" + r.toString(16)+g.toString(16)+b.toString(16)
}
